#pragma once

#include <bofcl_csr_r.h>

// mtvt2寄存器的定义
typedef struct {
	u32_s MTVT2EN : 1;
	u32_s : 1;
	u32_s COMMON_CODE_ENTRY : 30;
} csr_mtvt2_s;

_Static_assert(sizeof(csr_mtvt2_s) == 4, "Struct csr_mtvt2_s defined error!");

static inline void csr_wreg_mtvt2(csr_mtvt2_s mtvt2) {
	union {
		csr_mtvt2_s m;
		u32_s u;
	} mu = {
		.m = mtvt2,
	};
	csr_wreg(CSR_MTVT2, mu.u);
}
